/*
 * This file is part of freewm.
 *
 * freewm is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * freewm is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with freewm.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef WM_H
#define WM_H

#include "incs.h"

// Client structure.
struct wm_client
{
	Window win, frame;
	int ignore_unmap;
	int workspace;
	int mapped;
};

// wm_del_type enumerator.
enum wm_del_type {
	WM_DEL_NORMAL,
	WM_DEL_UNPARENT
};

void wm_new(Window w);
void wm_add(Window w, Window nw);
void wm_del(struct wm_client *c, enum wm_del_type type);
void wm_scan_premapped(void);
struct wm_client *wm_find(Window w);

struct wm_client *wm_get(int pos);
Window wm_focused(void);
void wm_focus(Window w);

void wm_workspace_add(void);
void wm_workspace_del(void);
void wm_workspaces_set(int num);
int wm_workspace(void);
int wm_workspaces(void);
void wm_workspace_goto(int num);
void wm_workspace_next(void);
void wm_workspace_prev(void);

#endif /* WM_H */
